home *** CD-ROM | disk | FTP | other *** search
/ Aminet 15 / Aminet 15 - Nov 1996.iso / Aminet / dev / misc / libx11inc.lha / X11 / Xm / SelectioBP.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-02-13  |  9.9 KB  |  274 lines

  1. /* 
  2.  * (c) Copyright 1989, 1990, 1991, 1992 OPEN SOFTWARE FOUNDATION, INC.
  3.  * ALL RIGHTS RESERVED
  4. */ 
  5. /*   $RCSfile: SelectioBP.h,v $ $Revision: 1.13 $ $Date: 92/05/14 12:57:01 $ */
  6. /*
  7. *  (c) Copyright 1989, DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. */
  8. /*
  9. *  (c) Copyright 1987, 1988, 1989, 1990, 1991, 1992 HEWLETT-PACKARD COMPANY */
  10. #ifndef _XmSelectionBoxP_h
  11. #define _XmSelectionBoxP_h
  12.  
  13. #include <Xm/BulletinBP.h>
  14. #include <Xm/SelectioB.h>
  15.  
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19.  
  20. /* Defines for use in allocation geometry matrix. */
  21.  
  22. #define XmSB_MAX_WIDGETS_VERT    8
  23.  
  24. #define XmUNSPECIFIED        (~0)
  25.  
  26. /*  New fields for the SelectionBox widget class record  */
  27.  
  28. typedef struct
  29. {
  30.         XtCallbackProc  list_callback ;
  31.     XtPointer        extension;      /* Pointer to extension record */
  32. } XmSelectionBoxClassPart;
  33.  
  34.  
  35. /* Full class record declaration */
  36.  
  37. typedef struct _XmSelectionBoxClassRec
  38. {
  39.     CoreClassPart            core_class;
  40.     CompositeClassPart        composite_class;
  41.     ConstraintClassPart        constraint_class;
  42.     XmManagerClassPart        manager_class;
  43.     XmBulletinBoardClassPart    bulletin_board_class;
  44.     XmSelectionBoxClassPart        selection_box_class;
  45. } XmSelectionBoxClassRec;
  46.  
  47. externalref XmSelectionBoxClassRec xmSelectionBoxClassRec;
  48.  
  49.  
  50. /* New fields for the SelectionBox widget record */
  51.  
  52. typedef struct
  53. {
  54.     Widget        list_label;        /*  list Label  */
  55.     XmString    list_label_string;
  56.  
  57.     Widget        list;            /*  List  */
  58.     XmString    *list_items;
  59.     int        list_item_count;
  60.     int        list_visible_item_count;
  61.     int        list_selected_item_position;
  62.  
  63.     Widget        selection_label;    /*  selection Label  */
  64.     XmString    selection_label_string;
  65.  
  66.     Widget        text;            /*  Text  */
  67.     XmString    text_string;
  68.     short        text_columns;
  69.  
  70.     Widget        work_area;        /*  other widget  */
  71.  
  72.     Widget        separator;        /*  separator  */
  73.  
  74.     Widget        ok_button;        /*  enter button  */
  75.     XmString    ok_label_string;
  76.  
  77.     Widget        apply_button;        /*  apply button  */
  78.     XmString    apply_label_string;
  79.  
  80.     XmString    cancel_label_string;    /*  cancel button label  */
  81.  
  82.     Widget        help_button;        /*  help button  */
  83.     XmString    help_label_string;
  84.  
  85.     XtCallbackList    ok_callback;        /*  callbacks  */
  86.     XtCallbackList    apply_callback;
  87.     XtCallbackList    cancel_callback;
  88.     XtCallbackList    no_match_callback;
  89.  
  90.     XtAccelerators    text_accelerators;
  91.  
  92.     Boolean        must_match;        /*  flags  */
  93.     Boolean        adding_sel_widgets;
  94.     Boolean        minimize_buttons;
  95.  
  96.     unsigned char    dialog_type;        /*  prompt or selection  */
  97.       unsigned char   child_placement;
  98. } XmSelectionBoxPart;
  99.  
  100.  
  101. /****************************************************************
  102.  *
  103.  * Full instance record declaration
  104.  *
  105.  ****************************************************************/
  106.  
  107. typedef struct _XmSelectionBoxRec
  108. {
  109.     CorePart        core;
  110.     CompositePart        composite;
  111.     ConstraintPart        constraint;
  112.     XmManagerPart        manager;
  113.     XmBulletinBoardPart    bulletin_board;
  114.     XmSelectionBoxPart    selection_box;
  115. } XmSelectionBoxRec;
  116.  
  117.  
  118. /*  access macros  */
  119.  
  120. #define SB_ListLabel(w) (((XmSelectionBoxWidget) (w))->selection_box.list_label)
  121. #define SB_List(w) (((XmSelectionBoxWidget) (w))->selection_box.list)
  122. #define SB_SelectionLabel(w) (((XmSelectionBoxWidget) (w))->selection_box.selection_label)
  123. #define SB_Text(w) (((XmSelectionBoxWidget) (w))->selection_box.text)
  124. #define SB_WorkArea(w) (((XmSelectionBoxWidget) (w))->selection_box.work_area)
  125. #define SB_Separator(w) (((XmSelectionBoxWidget) (w))->selection_box.separator)
  126. #define SB_OkButton(w) (((XmSelectionBoxWidget) (w))->selection_box.ok_button)
  127. #define SB_ApplyButton(w) (((XmSelectionBoxWidget) (w))->selection_box.apply_button)
  128. #define SB_CancelButton(w) (((XmSelectionBoxWidget) (w))->bulletin_board.cancel_button)
  129. #define SB_HelpButton(w) (((XmSelectionBoxWidget) (w))->selection_box.help_button)
  130. #define SB_DefaultButton(w) (((XmSelectionBoxWidget) (w))->bulletin_board.default_button)
  131. #define SB_MarginHeight(w) (((XmSelectionBoxWidget) (w))->bulletin_board.margin_height)
  132. #define SB_MarginWidth(w) (((XmSelectionBoxWidget) (w))->bulletin_board.margin_width)
  133. #define SB_ButtonFontList(w) (((XmSelectionBoxWidget) (w))->bulletin_board.button_font_list)
  134. #define SB_LabelFontList(w) (((XmSelectionBoxWidget) (w))->bulletin_board.label_font_list)
  135. #define SB_TextFontList(w) (((XmSelectionBoxWidget) (w))->bulletin_board.text_font_list)
  136. #define SB_StringDirection( w) \
  137.                        (((XmSelectionBoxWidget)( w))->manager.string_direction)
  138. #define SB_AddingSelWidgets( w) \
  139.                  (((XmSelectionBoxWidget) w)->selection_box.adding_sel_widgets)
  140. #define SB_TextAccelerators( w) \
  141.                   (((XmSelectionBoxWidget) w)->selection_box.text_accelerators)
  142. #define SB_ListItemCount( w) \
  143.                     (((XmSelectionBoxWidget) w)->selection_box.list_item_count)
  144. #define SB_ListSelectedItemPosition( w) (((XmSelectionBoxWidget) w) \
  145.                                    ->selection_box.list_selected_item_position)
  146. #define SB_ListVisibleItemCount( w) (((XmSelectionBoxWidget) w) \
  147.                                        ->selection_box.list_visible_item_count)
  148. #define SB_TextColumns( w) \
  149.                        (((XmSelectionBoxWidget) w)->selection_box.text_columns)
  150. #define SB_MinimizeButtons( w) \
  151.                    (((XmSelectionBoxWidget) w)->selection_box.minimize_buttons)
  152. #define SB_MustMatch( w) (((XmSelectionBoxWidget) w)->selection_box.must_match)
  153.  
  154.  
  155. /********    Private Function Declarations    ********/
  156. #ifdef _NO_PROTO
  157.  
  158. extern void _XmSelectionBoxCreateListLabel() ;
  159. extern void _XmSelectionBoxCreateSelectionLabel() ;
  160. extern void _XmSelectionBoxCreateList() ;
  161. extern void _XmSelectionBoxCreateText() ;
  162. extern void _XmSelectionBoxCreateSeparator() ;
  163. extern void _XmSelectionBoxCreateOkButton() ;
  164. extern void _XmSelectionBoxCreateApplyButton() ;
  165. extern void _XmSelectionBoxCreateCancelButton() ;
  166. extern void _XmSelectionBoxCreateHelpButton() ;
  167. extern XmGeoMatrix _XmSelectionBoxGeoMatrixCreate() ;
  168. extern Boolean _XmSelectionBoxNoGeoRequest() ;
  169. extern void _XmSelectionBoxGetSelectionLabelString() ;
  170. extern void _XmSelectionBoxGetListLabelString() ;
  171. extern void _XmSelectionBoxGetTextColumns() ;
  172. extern void _XmSelectionBoxGetTextString() ;
  173. extern void _XmSelectionBoxGetListItems() ;
  174. extern void _XmSelectionBoxGetListItemCount() ;
  175. extern void _XmSelectionBoxGetListVisibleItemCount() ;
  176. extern void _XmSelectionBoxGetOkLabelString() ;
  177. extern void _XmSelectionBoxGetApplyLabelString() ;
  178. extern void _XmSelectionBoxGetCancelLabelString() ;
  179. extern void _XmSelectionBoxGetHelpLabelString() ;
  180. extern void _XmSelectionBoxUpOrDown() ;
  181. extern void _XmSelectionBoxRestore() ;
  182.  
  183. #else
  184.  
  185. extern void _XmSelectionBoxCreateListLabel( 
  186.                         XmSelectionBoxWidget sel) ;
  187. extern void _XmSelectionBoxCreateSelectionLabel( 
  188.                         XmSelectionBoxWidget sel) ;
  189. extern void _XmSelectionBoxCreateList( 
  190.                         XmSelectionBoxWidget sel) ;
  191. extern void _XmSelectionBoxCreateText( 
  192.                         XmSelectionBoxWidget sel) ;
  193. extern void _XmSelectionBoxCreateSeparator( 
  194.                         XmSelectionBoxWidget sel) ;
  195. extern void _XmSelectionBoxCreateOkButton( 
  196.                         XmSelectionBoxWidget sel) ;
  197. extern void _XmSelectionBoxCreateApplyButton( 
  198.                         XmSelectionBoxWidget sel) ;
  199. extern void _XmSelectionBoxCreateCancelButton( 
  200.                         XmSelectionBoxWidget sel) ;
  201. extern void _XmSelectionBoxCreateHelpButton( 
  202.                         XmSelectionBoxWidget sel) ;
  203. extern XmGeoMatrix _XmSelectionBoxGeoMatrixCreate( 
  204.                         Widget wid,
  205.                         Widget instigator,
  206.                         XtWidgetGeometry *desired) ;
  207. extern Boolean _XmSelectionBoxNoGeoRequest( 
  208.                         XmGeoMatrix geoSpec) ;
  209. extern void _XmSelectionBoxGetSelectionLabelString( 
  210.                         Widget wid,
  211.                         int resource_offset,
  212.                         XtArgVal *value) ;
  213. extern void _XmSelectionBoxGetListLabelString( 
  214.                         Widget wid,
  215.                         int resource_offset,
  216.                         XtArgVal *value) ;
  217. extern void _XmSelectionBoxGetTextColumns( 
  218.                         Widget wid,
  219.                         int resource_offset,
  220.                         XtArgVal *value) ;
  221. extern void _XmSelectionBoxGetTextString( 
  222.                         Widget wid,
  223.                         int resource_offset,
  224.                         XtArgVal *value) ;
  225. extern void _XmSelectionBoxGetListItems( 
  226.                         Widget wid,
  227.                         int resource_offset,
  228.                         XtArgVal *value) ;
  229. extern void _XmSelectionBoxGetListItemCount( 
  230.                         Widget wid,
  231.                         int resource_offset,
  232.                         XtArgVal *value) ;
  233. extern void _XmSelectionBoxGetListVisibleItemCount( 
  234.                         Widget wid,
  235.                         int resource_offset,
  236.                         XtArgVal *value) ;
  237. extern void _XmSelectionBoxGetOkLabelString( 
  238.                         Widget wid,
  239.                         int resource_offset,
  240.                         XtArgVal *value) ;
  241. extern void _XmSelectionBoxGetApplyLabelString( 
  242.                         Widget wid,
  243.                         int resource_offset,
  244.                         XtArgVal *value) ;
  245. extern void _XmSelectionBoxGetCancelLabelString( 
  246.                         Widget wid,
  247.                         int resource_offset,
  248.                         XtArgVal *value) ;
  249. extern void _XmSelectionBoxGetHelpLabelString( 
  250.                         Widget wid,
  251.                         int resource_offset,
  252.                         XtArgVal *value) ;
  253. extern void _XmSelectionBoxUpOrDown( 
  254.                         Widget wid,
  255.                         XEvent *event,
  256.                         String *argv,
  257.                         Cardinal *argc) ;
  258. extern void _XmSelectionBoxRestore( 
  259.                         Widget wid,
  260.                         XEvent *event,
  261.                         String *argv,
  262.                         Cardinal *argc) ;
  263.  
  264. #endif /* _NO_PROTO */
  265. /********    End Private Function Declarations    ********/
  266.  
  267.  
  268. #ifdef __cplusplus
  269. }  /* Close scope of 'extern "C"' declaration which encloses file. */
  270. #endif
  271.  
  272. #endif /* _XmSelectionBoxP_h */
  273. /* DON'T ADD ANYTHING AFTER THIS #endif */
  274.